[#-- freemarker page demo --]
[#--无法引用,
freemarker 2.3.15以下版本,tld文件读取正常,但错误提示：
freemarker.template.TemplateModelException: out != pageContext.getOut(). Out is org.apache.jasper.runtime.JspWriterImpl@7a4b35d5 pageContext.getOut() is null

freemarker 2.3.15以上版本(2.3.18, 2.3.19), 提示没有找到tld错误.
目前暂不处理,组件将不使用jsp的任何标签
[#assign s=JspTaglibs["/WEB-INF/tld/struts-tags.tld"] >--]
<style type="text/css">
	.page-table {
		margin: 0;
		padding: 0;
		font-family: Times, TimesNR, 'New Century Schoolbook', Georgia,'New York', serif;
		text-align: center;
		width:97%;
		font-size:13px;
	}
	
	.page-td {
	 	float: left;
	}
	
	.page-td-p {
		background: none repeat scroll 0 0 #FFFFFF;
	    border: 1px solid #DCDDDD;
	    color: #1E50A2;
	    display: inline-table;
	    margin: 5px 3px 0 0;
	    padding: 4px 5px 0;
	    text-align: center;
	    /*垂直居中*/
	    height: 16px;
	    line-height: 16px;
	    /*去掉下划线*/
	   text-decoration: none;
	}
	
	.page-td a:hover {
		background: none repeat scroll 0 0 #1F3A87;
	    /*border: 1px solid #DCDDDD;*/
	    border: 1px solid #1F3A87;
	    color: #FFFFFF;
	    /*font-weight: bold;*/
	    text-align: center;
	    text-decoration: underline;
	}
	
	.page-selected {
		background: none repeat scroll 0 0 #1F3A87;
	    border: 1px solid #DCDDDD;
	    color: #FFFFFF;
	    font-weight: bold;
	    text-align: center;
	}
	
	.page-disable {
		cursor: default;
	}
</style>
[#--这是一个最大显示x页的分页,只显示当前页的前三后三页（当不足时,只显示可显示部分）,其他页省略号代替.--]
 [#assign x=pageSupport.getTotalPage() /]
 [#assign y=pageSupport.getCurrentPage() /]
 [#-- z=3:前二后二--]
 [#assign z=3 /]
<table class="page-table" align="center" id=${pageId}>
	<tr>
		<td class="page-td">
			[#--首页--]
			<a class="page-td-p" target="${page.target}" href="${page.getPageUrl(1)}">${displayer.getMessage("page.first")}</a>
			[#-- 上一页
			[#if pageSupport.isFirst() >
				<span class="page-td-p page-disable">${displayer.getMessage("page.previous")}</span>
			[#else>
				<a class="page-td-p" target="${page.target}" href="${page.getPageUrl(y-1)}">${displayer.getMessage("page.previous")}</a>
			[/#if]
			--]
			[#if (y-z>0)]
				...
			[/#if]
			 [#list 1..x as i]
			 	[#if i == y]
			 		<span class="page-td-p page-selected">${i}</span>
			 	[#else]
			 		[#--前二后儿--]
			 		[#if (i>y && i-y< z) || (i<y && y-i < z) ]
			 			<a class="page-td-p" target="${page.target}" href="${page.getPageUrl(i)}">${i}</a>
			 		[#else]
			 		[/#if]
			 	[/#if]
			 [/#list]
			[#if (x-y>z)]
				...
			[/#if]
			 [#--下一页
			 [#if pageSupport.isLast() ]
			 	<span class="page-td-p page-disable">${displayer.getMessage("page.next")}</span>
			 [#else]
			 	<a class="page-td-p" target="${page.target}" class="s1" href="${page.getPageUrl(y+1)}">${displayer.getMessage("page.next")}</a>
			 [/#if]
			 --]
			 [#--尾页--]
			<a class="page-td-p" target="${page.target}" href="${page.getPageUrl(x)}">${displayer.getMessage("page.last")}</a>
			[#-- <form method="GET" onsubmit="javascript:{document.location.href = this.navurlprefix.value + '/pagenum/' + this.pagenum.value;return false;}>
				<input type="hidden" value="${page.url}" name="navurlprefix" >
				<span class="">${displayer.getMessage("page.skip", ['<input name="pagenum" value="${x}" class=page-td-p style="width:18px; height: 18px;line-height: 18px;"/]'])}<a class="page-button-ok" href="">确定</a></span>
			</form>--]
			<span class="page-td-p page-disable">${y}页/共${x}页</span>
			<div class="clear"></div>
		</td>
	</tr>
</table>